package com.ld.security.auth.common.sys.login;

import com.ld.security.auth.common.sys.service.ISysUserService;

import com.ld.security.auth.common.sys.vo.UserDetailsVo;
import com.ld.security.auth.common.sys.vo.UserInfoVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Component;

@Component
public class UserInfoService  implements UserService{

    @Lazy
    @Autowired
    ISysUserService userCache;


    public UserInfoVo getUserInfo(String username) {

        return userCache.getUserInfo(username);
    }


    public UserDetailsVo getUserDetails(String username) {

        return userCache.getUserDetails(username);
    }



    public void flushByUsername(String username){
        userCache.flushByUsername(username);
    }


    public void flushAll(){
        userCache.flushAll();
    }
}
